1
general::
Phrase(s): beat one’s head against the wall [and] bang one’s head against a brick wall
Fig. to waste one’s time trying hard to accomplish something that is completely hopeless. • You’re wasting your time trying to figure this puzzle out. You’re just beating your head against the wall. • You’re banging your head against a brick wall trying to get that dog to behave properly.
McGrawhill's American Idioms And Phrasal Verbs